<template>
	<view>
		<scroll-view scroll-y class="page">
			<!-- 头部 -->
			<cu-custom bgColor="bg-rgb" :isBack="true">
				<block slot="backText">返回</block>
				<block slot="content">拆分板</block>
			</cu-custom>
			<!-- 查询条件 -->
			<view class="fixed" :style="[{animationDelay: 0.1 + 's'}]">
				<form>
					<view class="cu-form-group">
						<view class="title">打印数量：</view>
						<input class="border" placeholder="请输入打印数量" v-model="printNum"></input>
					</view>
					<view class="cu-form-group">
						<view class="title">二维码：</view>
						<input class="border" auto-focus placeholder="请扫描或输入二维码" v-model="printCode"></input>
					</view>
					<view class="cu-form-group">
						<view class="btns">
							<view class="btn1" @click="print">打印</view>
						</view>
					</view>

				</form>
			</view>
		</scroll-view>
	</view>
</template>

<script>
	export default {
		name: 'receive',
		data() {
			return {
				printNum: '10',
				printCode: '',
			}
		},

		methods: {
			print(){
				this.$http.get('storage/mesStorageWholesale/splitBoard', {
				  params: {
				    id: this.printCode,
					printNum:this.printNum
				  }
				}).then(res => {
				  if (res.data.success) {
				    this.modal.show({
				      type: 'success',
				      content: res.data.message
				    })
				  } else {
				    this.modal.show({
				      type: 'error',
				      content: res.data.message
				    })
				  }
				})
			}
		},
	}
</script>

<style lang="less">
	page {
		background-color: #f1f1f1;

		.fixed {
			position: fixed;
			z-index: 1;
			width: 100%;
			background-color: white;
			height: 100rpx;
			border-bottom: 1rpx solid #eee;

			.last {
				border-bottom: 1rpx solid #eee;
				position: relative;

				.icon {
					width: 30rpx;
					height: 29rpx;
					position: absolute;
					top: 36rpx;
					left: 60rpx;
				}

				input {
					width: 686rpx;
					height: 68rpx;
					background: #FFFFFF;
					border: 1px solid #D5D8DF;
					border-radius: 34px;
					padding-left: 79rpx;
				}
			}
		}

		.list {
			margin-top: 120rpx;

			.card {
				margin: 30rpx;
				box-shadow: 0px 0px 5rpx 2rpx rgba(0, 0, 0, 0.1);
				border-radius: 10rpx;
				background-color: white;

				.top {
					display: flex;
					align-items: center;
					justify-content: space-between;
					// border-bottom: 20rpx solid #F0F0F0;
					// padding-bottom: 20rpx;
					font-weight: bold;
					padding: 20rpx 30rpx;

					.left {
						font-size: 28rpx;
						font-family: PingFang SC;
						font-weight: 400;
						color: #485A75;
						line-height: 50rpx;
					}

					.right {
						font-size: 28rpx;
						font-family: PingFang SC;
						font-weight: bold;
						color: #191919;
						line-height: 50rpx;
					}
				}

				.line {
					width: 750rpx;
					height: 10rpx;
					background: #F3F5F9;
				}

				.bottom {
					padding: 20rpx 30rpx;

					.box {
						display: flex;
						justify-content: space-between;
						padding: 20rpx 0;
						align-items: center;

						.lable {
							color: #485A75;
							font-size: 28rpx;
						}

						.content {
							width: 70%;
							text-align: right;
							color: #191919;
							font-weight: bold;
							word-break: break-all;
						}

						.shrink {
							height: 40rpx;
							overflow: hidden;
							white-space: nowrap;
							/*不换行*/
							text-overflow: ellipsis;
							/*超出部分文字以...显示*/
							font-weight: 400;
						}

						.unfold {
							text-align: left;
							font-weight: 400;
						}
					}
				}

				.btns {
					display: flex;
					justify-content: flex-end;
					align-items: center;
					padding: 0 20rpx;
					font-size: 25rpx;
					padding: 20rpx 30rpx;

					view {
						width: 180rpx;
						height: 64rpx;
						line-height: 50rpx;
						color: white;
						border-radius: 30rpx;
						padding: 10rpx 20rpx;
						text-align: center;
					}

					.btn1 {
						background-image: radial-gradient(circle, #3F55E9, #5F71ED, #7D8CF0);
					}

					.btn2 {
						background-image: radial-gradient(circle, #716BA9, #362D85, #57509A);
					}

					.btn3 {
						background-image: radial-gradient(circle, #354D9E, #354D9E, #697BB7);
					}
				}
			}
		}
	}

	.none .none1 {
		font-size: 30rpx;
		text-align: center;
		margin-top: 50rpx;
		color: #999999;
	}

	.none2 {
		font-size: 30rpx;
		text-align: center;
		margin-top: 50rpx;
		color: #999999;
	}
	.btns {
		display: flex;
		justify-content: flex-end;
		align-items: center;
		padding: 0 20rpx;
		font-size: 25rpx;
		padding: 20rpx 0rpx;

		view {
			width: 180rpx;
			height: 64rpx;
			line-height: 50rpx;
			color: white;
			border-radius: 30rpx;
			padding: 10rpx 20rpx;
			text-align: center;
		}

		.btn1 {
			background-image: radial-gradient(circle, #3F55E9, #5F71ED, #7D8CF0);
		}

		.btn2 {
			background-image: radial-gradient(circle, #716BA9, #362D85, #57509A);
		}

		.btn3 {
			background-image: radial-gradient(circle, #354D9E, #354D9E, #697BB7);
		}
	}
</style>
